package kr.hkit.powerjava.chapter14.windowbuilder;

import javax.swing.JPanel;
import java.awt.FlowLayout;
import javax.swing.JTextField;
import javax.swing.JLabel;

public class CalPanel extends JPanel {
	private JTextField tfLeft;
	private JLabel lblNewLabel;
	private JTextField tfRight;
	private JLabel lblNewLabel_1;
	private JTextField tfResult;
	

	/**
	 * Create the panel.
	 */
	public CalPanel() {

		initialize();
	}
	private void initialize() {
		setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		
		tfLeft = new JTextField();
		add(tfLeft);
		tfLeft.setColumns(5);
		
		lblNewLabel = new JLabel("*");
		add(lblNewLabel);
		
		tfRight = new JTextField();
		add(tfRight);
		tfRight.setColumns(5);
		
		lblNewLabel_1 = new JLabel("=");
		add(lblNewLabel_1);
		
		tfResult = new JTextField();
		add(tfResult);
		tfResult.setColumns(5);
	}
	
	public String getTfLeft() {
		return tfLeft.getText(); 
	}
	
	public void setTfLeft(String text) {
		tfLeft.setText(text); 
	}
	
	public String getTfRight() {
		return tfRight.getText(); 
	}
	
	public void setTfRight(String text) {
		tfRight.setText(text); 
	}
	
	public String getTfResult() {
		return tfResult.getText();
	}
	
	public void setTfResult(String text) {
		tfResult.setText(text); 
	}
	
	
	
}
